# 1 "../Codes/LCD/HT162X_Lcd.c"
# 1 "E:\\APT_Landscape_mode\\APT32F1023_New\\Source//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "../Codes/LCD/HT162X_Lcd.c"


# 1 "d:\\c-sky\\cdkrepo\\toolchain\\ckv2elfminilib\\v3.10.32\\r\\lib\\gcc\\csky-elfabiv2\\6.3.0\\include\\stddef.h" 1 3 4
# 149 "d:\\c-sky\\cdkrepo\\toolchain\\ckv2elfminilib\\v3.10.32\\r\\lib\\gcc\\csky-elfabiv2\\6.3.0\\include\\stddef.h" 3 4

# 149 "d:\\c-sky\\cdkrepo\\toolchain\\ckv2elfminilib\\v3.10.32\\r\\lib\\gcc\\csky-elfabiv2\\6.3.0\\include\\stddef.h" 3 4
typedef int ptrdiff_t;
# 216 "d:\\c-sky\\cdkrepo\\toolchain\\ckv2elfminilib\\v3.10.32\\r\\lib\\gcc\\csky-elfabiv2\\6.3.0\\include\\stddef.h" 3 4
typedef unsigned int size_t;
# 328 "d:\\c-sky\\cdkrepo\\toolchain\\ckv2elfminilib\\v3.10.32\\r\\lib\\gcc\\csky-elfabiv2\\6.3.0\\include\\stddef.h" 3 4
typedef long int wchar_t;
# 426 "d:\\c-sky\\cdkrepo\\toolchain\\ckv2elfminilib\\v3.10.32\\r\\lib\\gcc\\csky-elfabiv2\\6.3.0\\include\\stddef.h" 3 4
typedef struct {
  long long __max_align_ll __attribute__((__aligned__(__alignof__(long long))));
  long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
} max_align_t;
# 4 "../Codes/LCD/HT162X_Lcd.c" 2
# 1 "../Codes/LCD/HT162X.h" 1

# 1 "../Codes/LCD/HT162X_Lcd.h" 1

# 1 "../Codes/Y36_LCD_horizontal/temperature_control_sub_module/../temperature_control_sub_module/TempADC.h" 1




# 1 "../Codes/Y36_LCD_horizontal/typed.h" 1






# 6 "../Codes/Y36_LCD_horizontal/typed.h"
typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;

typedef unsigned short uint16_t;

typedef unsigned long long uint64_t;
# 1 "include/apt32f102_ck801.h" 1
# 85 "include/apt32f102_ck801.h"
typedef enum IRQn
{

        ISR_Restart = -32,
        ISR_Misaligned_Access = -31,
        ISR_Access_Error = -30,
        ISR_Divided_By_Zero = -29,
        ISR_Illegal = -28,
        ISR_Privlege_Violation = -27,
        ISR_Trace_Exection = -26,
        ISR_Breakpoint_Exception = -25,
        ISR_Unrecoverable_Error = -24,
        ISR_Idly4_Error = -23,
        ISR_Auto_INT = -22,
        ISR_Auto_FINT = -21,
        ISR_Reserved_HAI = -20,
        ISR_Reserved_FP = -19,
        ISR_TLB_Ins_Empty = -18,
        ISR_TLB_Data_Empty = -17,

        INTC_CORETIM_IRQn = 0,
        INTC_TIME1_IRQn = 1,
        INTC_UART0_IRQn = 2,
        INTC_GPIOA2_IRQn = 8,
} IRQn_Type;


void INTC_Init(void);
void force_interrupt(IRQn_Type IRQn);

void CK_CPU_EnAllNormalIrq(void);
void CK_CPU_DisAllNormalIrq(void);
# 15 "../Codes/Y36_LCD_horizontal/typed.h" 2
# 6 "../Codes/Y36_LCD_horizontal/temperature_control_sub_module/../temperature_control_sub_module/TempADC.h" 2
# 1 "../Codes/Y36_LCD_horizontal/temperature_control_sub_module/../temperature_control_sub_module/TempSysType.h" 1




# 1 "d:\\c-sky\\cdkrepo\\toolchain\\ckv2elfminilib\\v3.10.32\\r\\lib\\gcc\\csky-elfabiv2\\6.3.0\\include\\stdbool.h" 1 3 4
# 6 "../Codes/Y36_LCD_horizontal/temperature_control_sub_module/../temperature_control_sub_module/TempSysType.h" 2
# 24 "../Codes/Y36_LCD_horizontal/temperature_control_sub_module/../temperature_control_sub_module/TempSysType.h"
typedef enum
{
    Pt_Normal,
    Pt_Open,
    Pt_Short,
    Pt_LowTemp,
    Pt_HighTemp,
}_Pt_Status;
# 7 "../Codes/Y36_LCD_horizontal/temperature_control_sub_module/../temperature_control_sub_module/TempADC.h" 2

extern unsigned char ch;







extern double (*ADC_Convert_R)(unsigned int ad);
extern void (*TempADC_Delay0ms_Output)(void);


typedef struct __RTD
{
    int32_t value;
    _Pt_Status status;
}_RTD;
extern _RTD RTD[3];
# 48 "../Codes/Y36_LCD_horizontal/temperature_control_sub_module/../temperature_control_sub_module/TempADC.h"
extern unsigned char LowTemp_Ctrl;

void ADInit(void);
void ADC_Clock(void);
void ADSampling(void);
void TempADC_Main(void);
void LowTempAlarm(void);
void ADC_KeyUpDown(void);
# 3 "../Codes/LCD/HT162X_Lcd.h" 2





typedef enum
{
    Lcd_NotShine = 0,
    Lcd_Shine,
    Lcd_DelayShine_Trigger,
    Lcd_DelayShine,
}Lcd_State_E;

typedef struct
{
    uint16_t Get;
    uint16_t Write;

}Lcd_TempSet_S;
typedef struct
{
    uint16_t val;
    Lcd_State_E isShine;
}Lcd_TempAct_S;
extern Lcd_TempAct_S Lcd_TempAct;
typedef struct
{
    Lcd_TempSet_S Hour;
    Lcd_TempSet_S Minute;
    uint16_t Second;
    unsigned int Downcount;
    unsigned int Setting;
    unsigned char Enable;
    void (*Hour_Add_Handle)(void);
    void (*Hour_Sub_Handle)(void);
    void (*Minute_Add_Handle)(void);
    void (*Minute_Sub_Handle)(void);
    Lcd_State_E isShine_Hour;
    Lcd_State_E isShine_Minute;
}Lcd_Timer_S;
extern Lcd_Timer_S Lcd_Timer;
extern Lcd_State_E Lcd_Timer_Colon_IsShow;
typedef struct
{
    uint16_t Temp;
    uint16_t Temp_Settings;
    Lcd_State_E isShine;
}Lcd_Probe1_S;
extern Lcd_Probe1_S Lcd_Probe1;
typedef struct
{
    uint16_t Temp;
    uint16_t Temp_Settings;
    Lcd_State_E isShine;
}Lcd_Probe2_S;
extern Lcd_Probe2_S Lcd_Probe2;

extern void (*Lcd_TempAct_AutoShine_Handle)(void);

void HT162X_Lcd_10ms(void);
# 3 "../Codes/LCD/HT162X.h" 2
# 1 "../Codes/LCD/HT162X_Parts.h" 1





typedef enum
{
 Char_ON= 0,
    Char_OFF,
}Char_E;

void Lcd_F(Char_E dis);
void Lcd_C(Char_E dis);
void Lcd_Wifi(Char_E dis);
void Lcd_Cook(Char_E dis);
void Lcd_PSet(Char_E dis);
void Lcd_Timer_Colon(Char_E dis);
void Lcd_Probe1_Show(Char_E dis);
void Lcd_Probe2_Show(Char_E dis);
void Lcd_Actual(Char_E dis);

void Lcd_Parts_Init(void);
void Lcd_Parts_NotShow(void);
# 4 "../Codes/LCD/HT162X.h" 2






typedef enum
{
    HT_Seg_0,
    HT_Seg_1,
    HT_Seg_2,
    HT_Seg_3,
    HT_Seg_4,
    HT_Seg_5,
    HT_Seg_6,
    HT_Seg_7,
    HT_Seg_8,
    HT_Seg_9,
    HT_Seg_10,
    HT_Seg_11,
    HT_Seg_12,
    HT_Seg_13,
    HT_Seg_14,
    HT_Seg_15,
}HT_Seg_E;



typedef enum
{
    Cad_Pin_1 = HT_Seg_4,
    Cad_Pin_2 = HT_Seg_5,
    Cad_Pin_3 = HT_Seg_6,
    Cad_Pin_4 = HT_Seg_7,
    Cad_Pin_5 = HT_Seg_8,
    Cad_Pin_6 = HT_Seg_9,
    Cad_Pin_7 = HT_Seg_10,
    Cad_Pin_8 = HT_Seg_11,
    Cad_Pin_9 = HT_Seg_12,
    Cad_Pin_10 = HT_Seg_13,
    Cad_Pin_11 = HT_Seg_14,
    Cad_Pin_12 = HT_Seg_15,
    Cad_Pin_13 = HT_Seg_3,
    Cad_Pin_14 = HT_Seg_2,
    Cad_Pin_15 = HT_Seg_1,
    Cad_Pin_16 = HT_Seg_0,
}Cad_Pin_E;

typedef enum
{
    Cad_Com1 = 0x01,
    Cad_Com2 = 0x02,
    Cad_Com3 = 0x04,
    Cad_Com4 = 0x08,
    Cad_Com5 = 0x10,
    Cad_Com6 = 0x20,
    Cad_Com7 = 0x40,
    Cad_Com8 = 0x80,
}Cad_Com_E;

typedef struct
{
    Cad_Com_E Cad_Com;
    Cad_Pin_E Cad_Pin;
    Char_E Cad_Dis;
}Cad_Dat_S;


typedef struct
{
    void (*HT_CS_Handled)(unsigned char);
    void (*HT_WR_Handled)(unsigned char);
    void (*HT_RD_Handled)(unsigned char);
    void (*HT_Data_Handled)(unsigned char);
}HT162X_Device_S;
typedef struct
{
    unsigned char address;
    unsigned char data;
}HT_Data_S;

void HT162X_Init(void);
void HT162X_RAM_Tx(void);
void HT162X_Reset(void);

void HT_RAM_Setting(Cad_Dat_S Cad_Dat);
# 5 "../Codes/LCD/HT162X_Lcd.c" 2
# 1 "../Codes/LCD/HT162X_Lcd.h" 1
# 6 "../Codes/LCD/HT162X_Lcd.c" 2
# 1 "../Codes/LCD/../MCU_Mold/MCU_AbstractTube.h" 1







typedef enum
{
    Tube_A = 0x01,
    Tube_B = 0x02,
    Tube_C = 0x04,
    Tube_D = 0x08,
    Tube_E = 0x10,
    Tube_F = 0x20,
    Tube_G = 0x40,
    Tube_H = 0x80,
}Tube_Abstract_E;
typedef enum
{
    Tube_0 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_E | Tube_F),
    Tube_1 = (Tube_B | Tube_C),
    Tube_2 = (Tube_A | Tube_B | Tube_D | Tube_E | Tube_G),
    Tube_3 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_G),
    Tube_4 = (Tube_B | Tube_C | Tube_F | Tube_G),
    Tube_5 = (Tube_A | Tube_C | Tube_D | Tube_F | Tube_G),
    Tube_6 = (Tube_A | Tube_C | Tube_D | Tube_E | Tube_F | Tube_G),
    Tube_7 = (Tube_A | Tube_B | Tube_C),
    Tube_8 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_E | Tube_F | Tube_G),
    Tube_9 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_F | Tube_G),
    Tube_10 = 0,
    Tube_11 = Tube_G,
    Tube_12 = (Tube_A | Tube_E | Tube_F | Tube_G),
    Tube_13 = (Tube_A | Tube_D | Tube_E | Tube_F | Tube_G),
    Tube_14 = (Tube_E | Tube_G),
    Tube_15 = (Tube_C | Tube_E | Tube_G),
    Tube_16 = (Tube_C | Tube_D | Tube_E | Tube_G),
    Tube_17 = (Tube_A | Tube_B | Tube_E | Tube_F | Tube_G),
    Tube_18 = (Tube_A | Tube_F | Tube_G | Tube_C | Tube_D),
    Tube_19 = (Tube_F | Tube_E | Tube_G | Tube_B | Tube_C),
    Tube_20 = (Tube_F | Tube_E | Tube_D ),
    Tube_21 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_E | Tube_F),
    Tube_22 = (Tube_E),
    Tube_23 = (Tube_C | Tube_D | Tube_E),
}Tube_Encoder_E;
extern const Tube_Encoder_E Tube_Encoder[24];
# 7 "../Codes/LCD/HT162X_Lcd.c" 2




Lcd_TempAct_S Lcd_TempAct;
Lcd_Timer_S Lcd_Timer;
Lcd_State_E Lcd_Timer_Colon_IsShow;
Lcd_Probe1_S Lcd_Probe1;
Lcd_Probe2_S Lcd_Probe2;

void (*Lcd_TempAct_AutoShine_Handle)(void);



void HT162X_Lcd_10ms(void)
{
    static uint16_t tick_500ms = 0;
    static uint16_t shineTime = 0;
    static unsigned char showFlag_tempAct = 0;
    static unsigned char showFlag_timer_hour = 0;
    static unsigned char showFlag_timer_minute = 0;
    static unsigned char showFlag_P1 = 0;
    static unsigned char showFlag_P2 = 0;
    static unsigned char delay_Down_tempAct = 0;
    static unsigned char delay_Down_timer_hour = 0;
    static unsigned char delay_Down_timer_minute = 0;
    static unsigned char delay_Down_P1 = 0;
    static unsigned char delay_Down_P2 = 0;
    static unsigned char tick_1s;
}
